package org.bing.engine.core.domain;

public class ApplicationOfDomain extends AbstractEntity {
    private static final long serialVersionUID = 1978L;
    private Domain domain;
    private Application application;
    private ContainerSetting setting;

    public ApplicationOfDomain() {

    }

    public ApplicationOfDomain(Application app, Domain dom) {
        this.application = app;
        this.domain = dom;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder(64);
        if (getId() > 0) {
            sb.append("id:").append(getId()).append(",");
        }
        if (application != null) {
            sb.append("application:" + application.getName()).append(",");
        }
        if (domain != null) {
            sb.append("domain:" + domain.getName());
        }
        return sb.toString();
    }

    public Application getApplication() {
        return application;
    }

    public void setApplication(Application application) {
        this.application = application;
    }

    public Domain getDomain() {
        return domain;
    }

    public void setDomain(Domain domain) {
        this.domain = domain;
    }

    public ContainerSetting getSetting() {
        return setting;
    }

    public void setSetting(ContainerSetting setting) {
        this.setting = setting;
    }

}
